import { RouteObject, createBrowserRouter } from 'react-router-dom';
import Login from '../views/login';
import Home from '../views/home';
import HomePage from '../components/homePage';
import Announcement from '../components/announcement';
import SortManagement from '../components/sortManagement';
import Recruit from '../components/recruit/index';



const routes = createBrowserRouter([
  {
    path: '/',
    element: <Login />,
  },
  {
    path: '/home',
    element: <Home />,
    children: [{
      // 首页
      path: '',
      element:< HomePage/>
    },
    // 招财管理
    {
      //供应商管理
      path: 'recruit',
      element:< Recruit/>
    },
    //人事行政
    {
      //通知公告
      path: 'announcement',
      element:< Announcement/>
    },
    {
      //通知公告
      path: 'sortManagement',
      element:< SortManagement/>
    }
    ]
  },
  {
    path: '/login',
    element: <Login />,
  }
]);

export default routes;